<admintpl file="header" />
</head>
<body style="min-width: 800px;">
	<div class="wrap js-check-wrap">
		
		<form class="js-ajax-form" method="post">
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('Database/export_data')}" data-subcheck="true">立即备份</button>
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('Database/optimize')}" data-subcheck="true">优化表</button>
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('Database/repair')}" data-subcheck="true">修复表</button>
			</div>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="15"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x" checked="chedked"></label></th>						
						<th width="100">表名</th>
						<th width="150">数据量</th>
						<th width="150">数据大小</th>
						<th width="120">创建时间</th>						
						<th width="80">操作</th>
					</tr>
				</thead>
				<foreach name="list" item="vo">
				<tr>
					<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="tables[]" value="{$vo.name}" checked="chedked" ></td>					
					<td>{$vo.name}</td>
					<td>{$vo.rows}</td>
					<td>{$vo.data_length|format_bytes}</td>					
					<td>{$vo.create_time}</td>
					<td>
						<a href="{:U('Database/optimize',array('tablename'=>$vo['name']))}" class="" >优化表</a>
						<a href="{:U('Database/repair',array('tablename'=>$vo['name']))}" class="" >修复表</a>
					</td>
				</tr>
				</foreach>
				
			</table>
			
			
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>